package cn.livingCloud.entity.core;

import cn.livingCloud.context.BeanProvider;
import cn.livingCloud.entity.user.Member;
import cn.livingCloud.repository.MemberMapper;
import cn.livingCloud.utils.UuidGenerator;

/**
 * 自助绑定
 * Created by DingJie on 2016/6/23.
 */
public class SelfBinding extends BaseEntity {
    private transient MemberMapper memberMapper = BeanProvider.getBean(MemberMapper.class);
    private String uuid = UuidGenerator.generate();
    private String employeeName;
    private String deptName;
    private String phone;
    private String memberUuid;
    private boolean auditing = false;

    public SelfBinding() {
    }

    public String getMemberUuid() {
        return memberUuid;
    }

    public void setMemberUuid(String memberUuid) {
        this.memberUuid = memberUuid;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public boolean isAuditing() {
        return auditing;
    }

    public void setAuditing(boolean auditing) {
        this.auditing = auditing;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Member getMember() {
        return memberMapper.findMemberByUuid(this.memberUuid);
    }
}
